<template>
    <div class="home">
      <!-- <demo-item-five
        v-for="item in list"
        :key="item.id"
        :num="item.num"
      ></demo-item-five> -->
      <demo-item-five
        v-for="(item,index) in list2"
        :key="index"
      ></demo-item-five>
      <!-- <demo-item-five
        v-for="(item,index) in list2"
        :key="item"
      ></demo-item-five> -->
      <!-- <demo-item-five
        v-for="(item,index) in list2"
        :key="index"
        :num="item"
      ></demo-item-five> -->
      <div style="marginTop:100px;">
        <div v-for="(item,index) in list2" :key="index">{{Math.random()}}</div>
      </div>
      <button @click="change">change</button>
    </div>
  </template>
  
  <script>
  import demoItemFive from "@/components/demoItemFive.vue";
  
  export default {
    name: "DemoFive",
    components: {
        demoItemFive,
    },
    data() {
      return {
        list: [
          {
            id: 0,
            num: 1,
          },
          {
            id: 1,
            num: 2,
          },
          {
            id: 2,
            num: 3,
          },
        ],
        list2:[1,2,3]
      };
    },
    methods: {
      change() {
        // this.list.reverse();
        this.list2.splice(0, 1); // 删除第一条数据
      },
    },
  };
  </script>
  